package com.uclick.chat2;

import java.io.File;
import java.io.Serializable;

/**
 * @author Administrator
 * 
 */
public class FileInfo implements Serializable {
	private static final long serialVersionUID = -2032724682711048544L;
	public static final int FILE_SEND = 100;
	public static final int FILE_SEND_FAIL = 101;
	public static final int FILE_SEND_SUCCESS = 102;
	public static final int File_SEND_REQUEST = 103;
	public static final int FILE_SEND_REFUSE = 104;
	public static final int FILE_SEND_ACCEPT = 105;
	public static final int FILE_RECEIVE = 106;
	public static final int FILE_RECEIVE_ACCEPT = 107;
	
	private int command;
	private long length;
	private byte[] data;
	private String sender;
	private String receiver;
	private String ip;
	private File file;
	public int getCommand() {
		return command;
	}
	public void setCommand(int command) {
		this.command = command;
	}
	public long getLength() {
		return length;
	}
	public void setLength(long length) {
		this.length = length;
	}
	public byte[] getData() {
		return data;
	}
	public void setData(byte[] data) {
		this.data = data;
	}
	public String getSender() {
		return sender;
	}
	public void setSender(String sender) {
		this.sender = sender;
	}
	public String getReceiver() {
		return receiver;
	}
	public void setReceiver(String receiver) {
		this.receiver = receiver;
	}
	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	public File getFile() {
		return file;
	}
	public void setFile(File file) {
		this.file = file;
	}
	public FileInfo(int command, long length, byte[] data, String sender,
			String receiver, String ip, File file) {
		super();
		this.command = command;
		this.length = length;
		this.data = data;
		this.sender = sender;
		this.receiver = receiver;
		this.ip = ip;
		this.file = file;
	}
	public FileInfo() {
		// TODO Auto-generated constructor stub
	}
	@Override
	public String toString() {
		return "FileInfo [command=" + command + ", receiver=" + receiver
				+ ", sender=" + sender + "]";
	}
	
}
